package com.yuetong.employee.service.impl;

import java.util.List;
import com.yuetong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yuetong.employee.mapper.YtEmployeeEntryInfoMapper;
import com.yuetong.employee.domain.YtEmployeeEntryInfo;
import com.yuetong.employee.service.IYtEmployeeEntryInfoService;

/**
 * 入职信息Service业务层处理
 * 
 * @author  卓晓君
 * @date 2025-04-24
 */
@Service
public class YtEmployeeEntryInfoServiceImpl implements IYtEmployeeEntryInfoService 
{
    @Autowired
    private YtEmployeeEntryInfoMapper ytEmployeeEntryInfoMapper;

    /**
     * 查询入职信息
     * 
     * @param entryId 入职信息主键
     * @return 入职信息
     */
    @Override
    public YtEmployeeEntryInfo selectYtEmployeeEntryInfoByEntryId(Long entryId)
    {
        return ytEmployeeEntryInfoMapper.selectYtEmployeeEntryInfoByEntryId(entryId);
    }

    /**
     * 查询入职信息列表
     * 
     * @param ytEmployeeEntryInfo 入职信息
     * @return 入职信息
     */
    @Override
    public List<YtEmployeeEntryInfo> selectYtEmployeeEntryInfoList(YtEmployeeEntryInfo ytEmployeeEntryInfo)
    {
        return ytEmployeeEntryInfoMapper.selectYtEmployeeEntryInfoList(ytEmployeeEntryInfo);
    }

    /**
     * 新增入职信息
     * 
     * @param ytEmployeeEntryInfo 入职信息
     * @return 结果
     */
    @Override
    public int insertYtEmployeeEntryInfo(YtEmployeeEntryInfo ytEmployeeEntryInfo)
    {
        ytEmployeeEntryInfo.setCreateTime(DateUtils.getNowDate());
        return ytEmployeeEntryInfoMapper.insertYtEmployeeEntryInfo(ytEmployeeEntryInfo);
    }

    /**
     * 修改入职信息
     * 
     * @param ytEmployeeEntryInfo 入职信息
     * @return 结果
     */
    @Override
    public int updateYtEmployeeEntryInfo(YtEmployeeEntryInfo ytEmployeeEntryInfo)
    {
        ytEmployeeEntryInfo.setUpdateTime(DateUtils.getNowDate());
        return ytEmployeeEntryInfoMapper.updateYtEmployeeEntryInfo(ytEmployeeEntryInfo);
    }

    /**
     * 批量删除入职信息
     * 
     * @param entryIds 需要删除的入职信息主键
     * @return 结果
     */
    @Override
    public int deleteYtEmployeeEntryInfoByEntryIds(Long[] entryIds)
    {
        return ytEmployeeEntryInfoMapper.deleteYtEmployeeEntryInfoByEntryIds(entryIds);
    }

    /**
     * 删除入职信息信息
     * 
     * @param entryId 入职信息主键
     * @return 结果
     */
    @Override
    public int deleteYtEmployeeEntryInfoByEntryId(Long entryId)
    {
        return ytEmployeeEntryInfoMapper.deleteYtEmployeeEntryInfoByEntryId(entryId);
    }
}
